import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class HeaderIconWidget extends StatelessWidget {
  //来个路径
  final String? path;

  //来个点击事件
  final  void Function()? onTab;

  const HeaderIconWidget({Key? key, this.path, this.onTab}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return InkWell(
      onTap: onTab,
      child: Container(
        margin: EdgeInsets.only(right: 16),
        child: Image.asset(
          path??'',
          width: 22,
        ),
      ),
    );
  }
}
